package com.regent.central.bill.service.mrp;

import com.regent.central.bill.common.BillPurchaseArriveStatus;
import com.regent.central.bill.common.DataChangeType;
import com.regent.central.bill.core.mrp.ActionMaterialPurchase;
import com.regent.central.bill.core.mrp.BillMaterialPurchaseSku;
import com.regent.central.infrastructure.service.DomainService;

import java.math.BigDecimal;
import java.util.Set;

/**
 * @author 钟宝林
 * @date 2018-06-23 13:09
 **/
public interface BillMaterialPurchaseSkuService extends DomainService<BillMaterialPurchaseSku> {

    /**
     * 根据采购动作建立采购单物料sku二级数据
     *
     * @param actionMaterialPurchases 采购动作列表
     * @param billMaterialPurchaseId  采购单ID
     */
    void saveByActionPurchase(String billMaterialPurchaseId, Set<ActionMaterialPurchase> actionMaterialPurchases);

    /**
     * 设置状态
     */
    int setArriveStatus(BillPurchaseArriveStatus arriveStatus, String billMaterialPurchaseId, String facMissionId, String materialsSkuId, DataChangeType dataChangeType);

    int setQuantityArrive(BigDecimal quantityArrive, String billMaterialPurchaseId, String facMissionId, String materialsSkuId);

    int setArriveStatusSystem(BillPurchaseArriveStatus arriveStatus, String billMaterialPurchaseId, String facMissionId, String materialsSkuId);
}
